/**
 * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package org.opsli.api.wrapper.contract.contractinfo;

import java.math.BigDecimal;
import java.util.Date;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.opsli.api.base.warpper.ApiWrapper;
import org.opsli.common.annotation.validator.Validator;
import org.opsli.common.annotation.validator.ValidatorLenMax;
import org.opsli.common.annotation.validator.ValidatorLenMin;
import org.opsli.common.enums.ValidatorType;
import org.opsli.plugins.excel.annotation.ExcelInfo;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

/**
* 会员合同 Model
*
* @author 17607080935
* @date 2025-07-07 16:42:17
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ContractModel extends ApiWrapper {

    /** 合同唯一编号 */
    @ApiModelProperty(value = "合同唯一编号")
    @ExcelProperty(value = "合同唯一编号", order = 0)
    @ExcelInfo
    @Validator({
        ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(100)
    private String contractId;

    /** 学生id */
    @ApiModelProperty(value = "学生id")
    @ExcelProperty(value = "学生id", order = 1)
    @ExcelInfo
    @ValidatorLenMax(22)
    private String studentId;

    /** 客户id */
    @ApiModelProperty(value = "客户id")
    @ExcelProperty(value = "客户id", order = 2)
    @ExcelInfo
    @Validator({
        ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(22)
    private String customerId;

    /** 课程id */
    @ApiModelProperty(value = "课程id")
    @ExcelProperty(value = "课程id", order = 3)
    @ExcelInfo
    @Validator({
        ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(22)
    private String courseId;

    /** 签约时间 */
    @ApiModelProperty(value = "签约时间")
    @ExcelProperty(value = "签约时间", order = 4)
    @ExcelInfo
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date signDate;

    /** 生效时间 */
    @ApiModelProperty(value = "生效时间")
    @ExcelProperty(value = "生效时间", order = 5)
    @ExcelInfo
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startDate;

    /** 失效时间 */
    @ApiModelProperty(value = "失效时间")
    @ExcelProperty(value = "失效时间", order = 6)
    @ExcelInfo
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endDate;

    /** 合同金额 */
    @ApiModelProperty(value = "合同金额")
    @ExcelProperty(value = "合同金额", order = 7)
    @ExcelInfo
    @Validator({
        ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(14)
    private BigDecimal totalAmount;

    /** 优惠金额 */
    @ApiModelProperty(value = "优惠金额")
    @ExcelProperty(value = "优惠金额", order = 8)
    @ExcelInfo
    @ValidatorLenMax(14)
    private BigDecimal discountAmount;

    /** 课时 */
    @ApiModelProperty(value = "课时")
    @ExcelProperty(value = "课时", order = 9)
    @ExcelInfo
    @Validator({
        ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(8)
    private Integer lessonsNumber;

    /** 赠送课时 */
    @ApiModelProperty(value = "赠送课时")
    @ExcelProperty(value = "赠送课时", order = 10)
    @ExcelInfo
    @ValidatorLenMax(5)
    private Integer freeLessons;

    /** 状态 */
    @ApiModelProperty(value = "状态")
    @ExcelProperty(value = "状态", order = 11)
    @ExcelInfo( dictType = "contract_status" )
    @Validator({
        ValidatorType.IS_INTEGER, 
        ValidatorType.IS_NOT_NULL
    })
    private String status;

    /** 付款类型(一次性，分期) */
    @ApiModelProperty(value = "付款类型(一次性，分期)")
    @ExcelProperty(value = "付款类型(一次性，分期)", order = 12)
    @ExcelInfo( dictType = "payment_method" )
    @ValidatorLenMax(220)
    private String paymentMethod;

    /** 付款方式 */
    @ApiModelProperty(value = "付款方式")
    @ExcelProperty(value = "付款方式", order = 13)
    @ExcelInfo( dictType = "pay_type" )
    @ValidatorLenMax(222)
    private String payType;

    /** 已上课时 */
    @ApiModelProperty(value = "已上课时")
    @ExcelProperty(value = "已上课时", order = 14)
    @ExcelInfo
    @ValidatorLenMax(8)
    private Integer attendedLessons;

    /** 已排课时 */
    @ApiModelProperty(value = "已排课时")
    @ExcelProperty(value = "已排课时", order = 15)
    @ExcelInfo
    @ValidatorLenMax(8)
    private Integer scheduledLessons;

    /** ​​剩余课时 */
    @ApiModelProperty(value = "​​剩余课时")
    @ExcelProperty(value = "​​剩余课时", order = 16)
    @ExcelInfo
    @ValidatorLenMax(8)
    private Integer remainingLessons;

    /** 父级主键集合 */
    @ApiModelProperty(value = "父级主键集合")
    @ExcelProperty(value = "父级主键集合", order = 18)
    @ExcelInfo
    @ValidatorLenMax(500)
    private String orgIds;



}